package controller

import (
	"github.com/gin-gonic/gin"
	"hytx_manager/models"
	"hytx_manager/pkg/setting"
	"strconv"
)

func OperationLogList(c *gin.Context) {
	page, _ := strconv.Atoi(c.DefaultQuery("page", "1"))
	limit, _ := strconv.Atoi(c.DefaultQuery("limit", strconv.Itoa(setting.AppSetting.PageSize)))

	res, paginate := models.OperationLogList(page, limit, c)
	render(c, gin.H{
		"paginate": paginate,
		"data":     res,
	})
}
